package com.info33.platform.business.pay.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.info33.platform.business.pay.dto.TextDTO;
import com.info33.platform.business.pay.entity.Text;
import com.info33.platform.common.mvc.vo.Result;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public interface TextService extends IService<Text> {

    /**
     * 支付
     *
     * @param dto 参数
     * @return Result<Object>
     * @throws Exception 异常
     */
    Result<Object> appPay(HttpServletRequest request, TextDTO dto) throws Exception;

    /**
     * 阿里支付回调接口
     *
     * @param request --
     * @param response --
     * @throws Exception 异常
     * @return void
     */
    void breakInfo(HttpServletRequest request, HttpServletResponse response) throws Exception;

    /**
     * 微信支付回调接口
     *
     * @param request --
     * @param response --
     * @throws Exception 异常
     * @return void
     */
    void wxPayNotify(HttpServletRequest request, HttpServletResponse response);

    /**
     * 支付宝退款
     *
     * @param dto 参数
     * @return Result<?>
     */
    Result<?> payZfbRefund(TextDTO dto) throws Exception;

    /**
     * 微信退款
     *
     * @param dto 参数
     * @return Result<?>
     */
    Result<?> payWxRefund(TextDTO dto) throws Exception;

}
